package edu.java基础;

public class J_while循环 {
    public static void main(String[] args) {
        //while当不明确循环次数用
        int i = 1;
              //()中是false循环结束，true继续执行
        while (i <= 100){
            System.out.println(i);
            i++;
        }
        /*
        珠峰8844.43米，一张纸厚度0.1mm,折叠多少次可以达到珠峰高度
        */
        int count = 0;
        double paper = 0.1;
        int zf = 8844430;

        while (paper <= zf){
            paper *=2;
            System.out.println(paper);
            count++;
        }
        System.out.println(count);

        //do...while循环
        int j = 1;
        //do...while循环，无论循环条件是否满足，都至少执行一次
        //从上到下执行
        do {
            System.out.println("你好"+i);
            j++;
        }while (j <= 10);
    }
}
